package com.xinyue.cross.server.client;

import com.alibaba.nacos.common.utils.UuidUtils;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
@ConfigurationProperties(prefix = "xinyue.cross.client")
public class XinyueCrossClientConfig {
    /**
     * 用户负载均衡选择的服务的缓存的最大数量
     */
    private int balanceCacheMaxSize = 5000;
    private int balanceExpireTimeSecond = 60 * 60;
    /**
     * 心跳离隔时间
     */
    private int heartbeatIdleTime = 3000;
    /**
     * 客户端实例的id，默认是uuid，可以通过配置指定
     */
    private String clientInstanceId = UuidUtils.generateUuid();
}
